﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Game1942.Library.View
{
    public class LiveView
    {
        private Texture2D liveTexture = null;
        private Vector2 livePosition;
        private SpriteFont font;
        private int xPos, yPos;
        public IDisposable unsubscriber;


        public LiveView(int xPos, int yPos)
        {
            this.xPos = xPos;
            this.yPos = yPos;
            livePosition = new Vector2(xPos+40,yPos);
        }

        public void LoadContent(Texture2D liveTexture,SpriteFont font)
        {
            this.font = font;
            this.liveTexture = liveTexture;
        }

        public void Draw( SpriteBatch spriteBatch)
        {   
            spriteBatch.DrawString(font,
                "LIVES",
                new Vector2(xPos,yPos),
                Color.White);
           
            //Draw  
            spriteBatch.Draw(liveTexture,
                livePosition,
                new Rectangle(0, 0, liveTexture.Width, liveTexture.Height),
                Color.White,
                0.0f,
                Vector2.Zero,
                1.0f,
                SpriteEffects.None,
                0.0f);

        }

        /*
        //Provides the observer with new data.
        public void OnNext(Score value)
        {
            
        }

        //Notifies the observer that the provider has experienced an error condition.
        public void OnError(Exception error)
        {
            //Do nothing
        }

        //Notifies the observer that the provider has finished sending push-based notifications.
        public void OnCompleted()
        {
            unsubscriber.Dispose();
        }
         */
    }
}
